1SELECT CASE col1
2 WHEN 'agree' THEN 'Ok'
3 WHEN 'disagree' THEN 'Ko'
4 ELSE
5 CASE
6 WHEN col2 >= 1 THEN 'Ko'
7 ELSE 'Maybe'
8 END
9END AS my_result
10FROM table_name;
1select (
2case when (value1 = 1) then (value2)
3when (value2 = 1) then (value1) end) as newColumnname
4from tablename where value1 = 1 or value2 = 1