1 – CASE
An expression that evaluates to a single value. SQL compares the CASE clause value expression with each WHEN clause literal value in the WHEN clauses until it finds a match. The value expression cannot contain a column specification that is not part of a column select expression. See the Value_Expressions HELP topic for a complete description of the variety of value expressions that SQL provides.
2 – ELSE
Executes a set of SQL statements when SQL cannot find a WHEN clause that matches the value expression in the CASE clause. See the Compound_Statement HELP topic for a description of the SQL statements that are valid in a compound statement.
3 – THEN
Executes the set of SQL statements associated with the first WHEN clause in which its argument value matches the CASE value expression.
4 – WHEN
Syntax options: WHEN literal | WHEN NULL The literal or NULL value of the WHEN clause that SQL compares with the value expression of the CASE clause. Most CASE control statements include a set of WHEN clauses. When the values of the WHEN and CASE clauses match, SQL executes the SQL statements associated with that WHEN clause. Control then drops out of the CASE control statement and returns to the next SQL statement after the END CASE clause.