1-- PL/SQL
2BEGIN
3 IF my_val = 1 THEN [...]
4 ELSE [...]
5 END IF;
6END;
7-- In a query (DUAL is for Oracle)
8SELECT CASE WHEN my_col = 1 THEN 'Ok' ELSE 'Ko' END AS my_result
9FROM DUAL;
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