title: How to order results by customer expression in Hibernate/HQL/JPQL
body: <p>I have persistent entity Cats (id, name). I want to query all cats (using HQL/JPQL) that cats named 'Tom' were in top, i.e. order by custom expression name='Tom'. </p>
  
  <p>In Oracle I can do so using</p>
  
  <pre><code>ORDER BY CASE name WHEN 'Tom' THEN 0 ELSE 1 END.
  </code></pre>
  
  <p>How to do in Hibernate?</p>