IF statements are used to execute statements if specified conditions are met.

IF <boolean_expression> THEN <procedural_statement>; 
  [ELSEIF <boolean_expression> THEN <procedural_statement>;]
  [ELSE <procedural_statement>;]
END IF

where:

boolean_expression
is a boolean expression that is compared against a value.
procedural_statement
is the procedural statement that is executed when a condition is met.
ELSEIF
specifies that if the preceding condition was not met, the following conditions should be evaluated.
ELSE
specifies that if the preceding condition was not met, the specified statement should be executed.