title: SQL query ordering in custom order
body: <p>I have a custom ordering need like this:</p>
  
  <pre><code>normal ordering  |  custom ordering 
        1          |        7
        2          |        6
        3          |        5
        4          |        4
        5          |        3
        6          |        2
        7          |        8
        .          |        .
        .          |        .
        .          |        .
        .          |        .
        .          |        N
        N          |        1
  </code></pre>
  
  <p>I have thought about using <code>UNION</code> to combine 3 different select queries with the help of <code>ORDER BY</code> and <code>LIMIT</code>. However, I can not do that because <code>UNION</code> have to be used <strong>before</strong> <code>ORDER BY</code> and <code>LIMIT</code>.</p>
  
  <p>How can I make a selection (or selections) to achieve the custom ordering above?</p>
  
  <p>Another workaround might help is just make the <strong>1st record</strong> returned in this select query the last record, but how?</p>