Pervasive SQL if/switch syntax in SELECT query

Does anybody know how to do an IF or SWITCH statement inside of a SELECT query in a PSQL database?

Looking this up for a customer. They have pdf based docs that aren’t all that good. If nobody knows, I’ll download a trial and figure it out.

For the record, the Pervasive documentation that is actually installed with the server is quite good, and has the standard break down of commands (under SQL Engine Reference/SQL Syntax Reference/SELECT, for example).

To answer the question, there is both an IF and CASE command, as follows:

CASE case_value_expression WHEN when_expression THEN then_expression 
[...] [ ELSE else_expression ] END

and

IF ( search-condition , expression , expression )

Hope that helps,

Cool - thanks. I’ll get that to the customer.