Using a CASE statement in HQL select
I guess you can (3.6, 4.3) [inline edit] ...for where-clauses:
"Simple" case,
case ... when ... then ... else ... end
, and "searched" case,case when ... then ... else ... end
Apparently the ability to do this was added in 3.0.4, with the limitation that you cannot use sub-selects in the else clause.