how to replace the values in column to a string when a condition is met

Viewed 26

I am trying to replace the values 0 or 1 in a column with 'hit' or 'flop'

select (Box_office_revenue-Budget)>Budget as hit_flop
from movie_data
hit_flop          hit_flop
    0               flop
    0               flop
    0               flop
    1               hit
    1               hit

how to replace the values with the texts without creating a new column

Also, I want to get 'super hit' when box_office_revenue/budget > 10

1 Answers
select
Case when box_office_revenue/budget > 10 then 'Super Hit'
    when (Box_office_revenue-Budget)>Budget then 'Hit' 
    else 'Flop' end as hit_flop
from movie_data
Related