I'm writing a Drupal module and I want it to be agnostic between PostgreSQL and MySQL. I have a field that gets its value from a conditional, and I originally wrote it as an IF(). Then I found out that IF() is a MySQL-ism. So, I looked up the conditionals for PostgreSQL and CASE seemed to be the best tool.
However, I noticed that CASE ends with END in PostgreSQL, while in MySQL it ends with END CASE. Will this destroy my hopes for database agnosticism? Can I write an agnostic query with a conditional?