well i want to do a query as this but i dont know if it is posible
Select
col1,
col2,
col3,
if(contain(col3,'somethingx')) then 'hello' else 'world' as col4,
col5
from table1
In other words, I want to select
col1
col2
col3
if col3 contains the word 'somethingx' then I want to select 'hello' as col4
Otherwise I want to select 'world' as col5 from my table.
1 Answer