Doctrine 2 - ORM

CASE WHEN ... WHEN doesn't work