You can always mask every character, including single or double quotes, by using their ascii-code:
char(39)
returns a single quote:'
char(34)
returns a double quote:"
To find the ascii code, simply look for it with ascii()
: ascii('a') returns 97. To find the ascii code for single quotes, enter ascii('''')
- this returns 39
.
Thus you can also use:
CASE
WHEN "NAME" = 'WILSON' || char(39) || 'S' THEN '0,75,224'
END
char
even works for Unicode codes:
char(19123)
returns䪳
, the symbol coded 19123 in Unicode.