SQL Notebook (logo)

CHOOSE Function

Returns one of the arguments, as specified by numeric index in the first argument.

Syntax

CHOOSE(index, value1, value2, [value3], ...)

Arguments

Return Value

If index is between 1 and the number of value arguments, then the corresponding value argument is returned. If the index is out of bounds, NULL is returned.

Examples