title: CASE in ORDER BY
body: <p>I am using this ORDER BY clause in my MySQL query:</p>
  
  <pre><code>"ORDER BY FIELD(best_id.status, 'open', 'bekeken', 'verstuurd', 'binnen'), best_id.datum_leveren ASC
  </code></pre>
  
  <p>Works fine.</p>
  
  <p>Now I would like to make an difference with sorting the rows, ASC combined with DESC. I have been trying to achieve this by change the clause to:</p>
  
  <pre><code>ORDER BY FIELD(best_id.status, 'open', 'bekeken', 'verstuurd', 'binnen'),
  CASE WHEN best_id.status = 'binnen' THEN  best_id.datum_leveren DESC, END
  ELSE best_id.datum_leveren ASC END";
  </code></pre>
  
  <p>But I can't get it tow work. What is the right way for this or is it impossible to use an CASE in the ORDER BY clause?</p>
  
  <p>Any help is much appreciated.</p>