I\'m using H2 (with MySQL compatibility mode) to write some automated tests against our software that uses MySQL. Unfortunately, it seems like H2 does not have have the IF
IF
I've just had the same issue, and I resolved it with CASE/WHEN/THEN SQL statement. So you can rewrite your query as follows:
CASE/WHEN/THEN
SELECT CASE WHEN true THEN 'TRUE!!' ELSE 'FALSE!!!' END;
Surely it's more verbose, but it fits both H2 and MySQL.