decode

Compares "expression" to each search value one by one. If "expression" is equal to a search, then it returns the corresponding result. If no match is found, it returns "default", or if "default" is omitted, it returns null.

Syntax

decode ( expression , search , result [ , search , result ]... [ ,
 default ] )