The CASE statement provides a multi-branch decision based on the value of a single expression. You can specify multiple conditions, each with its own code, and execute the code when a condition is true. Each condition is defined in a WHENTHEN section. In addition, you can define an OTHERWISE section to handle any conditions that are not explicitly defined.

Syntax
CASE expression :
  {  WHEN value [ OR WHEN value ] ... THEN
       { block | statement }
  } ...
  [ OTHERWISE
       { block | statement }
  ]
END [ CASE ].

In the following code, the CASE statement is used to assign the yearly quarter based on the month.

DEFINE VARIABLE qtr AS CHARACTER NO-UNDO.

CASE MONTH(TODAY): 
  WHEN 1 OR WHEN 2 OR WHEN 3 THEN qtr = "Q1". 
  WHEN 4 OR WHEN 5 OR WHEN 6 THEN qtr = "Q2". 
  WHEN 7 OR WHEN 8 OR WHEN 9 THEN qtr = "Q3". 
  OTHERWISE qtr = "Q4".
END CASE.

MESSAGE "Today’s date is" TODAY SKIP 
        "The current quarter is" qtr.

Running the code produces output similar to the following, depending on the current date:

Today’s date is 04/04/19 
The current quarter is Q2