1IF Boolean_expression
2BEGIN
3 -- Statement block executes when the Boolean expression is TRUE
4END
5ELSE
6BEGIN
7 -- Statement block executes when the Boolean expression is FALSE
8END
1-- In a query (DUAL is for Oracle)
2SELECT CASE lower(my_col)
3 WHEN 'agree' THEN 'Ok'
4 WHEN 'maybe' THEN 'Wait'
5 ELSE 'Ko'
6END AS my_result
7FROM DUAL;