Is the Decode not working?

Is the Decode not working?

Can't seem to get decode to work at all. Even the most basic decodes are not working.
decode('test', 'es', '1', '0'),
decode(0, 0, 1, 1),

both return...

An unexpected error occurred when trying to process the request.

I also don't seem to be able to get the 'case' and 'if' statements to work.