CASE

Syntax

CASE(<default value>; <any>; <case 1>; <return value 1>; <case 2>; <return value 2>; ...)

or 

CASE(<default value>; <boolean condition 1>; <return value 1>; <boolean condition 2>; <return value 2>; ...)

Description

Exchanges values for others based on either specific cases or boolean conditions. Each case is evaluated in order. If none of the specified cases apply, the function returns the default value. Parameters must appear in pairs. The return and default values must be of the same type.

Default values cannot be NULL.

Examples

CASE(0;#Column1;"org";1;"gov";2;"com";3;"mil";null)

Column1CASE returns
org1
gov2
milNULL
biz0
com3
net0

CASE("10 or under";GE(#Column1;11);"Over 10")

Column1CASE returns
210 or under
410 or under
610 or under
810 or under
1010 or under
12Over 10
14Over 10
16Over 10
18Over 10
20Over 10