SELECT, END, WHEN, OTHERWISE, and NOP Instructions

SELECT tells the interpreter to select one of a number of instructions. It is used only with WHEN, THEN, END, and sometimes, OTHERWISE. The END instruction marks the end of every SELECT group. The SELECT instruction looks like this:

SELECT
   WHEN expression1
      THEN instruction1
   WHEN expression2
      THEN instruction2
   WHEN expression3
      THEN instruction3
...
OTHERWISE
   instruction
   instruction
   instruction
END

┴╓: An IF-THEN instruction cannot be used with a SELECT instruction unless it follows a WHEN or OTHERWISE instruction. You can read this format as follows: