title: Doctrine: Select statement using equals not accepted
body: <p>According to <a href="http://www.doctrine-project.org/jira/browse/DDC-2204">DDC-2204 issue</a> which states</p>
  
  <blockquote>
    <p>[Order by With Equals] is supported by including the condition in the SELECT clause, aliasing it, then using it. You might need to use "AS HIDDEN name" to prevent it from appearing in the result</p>
  </blockquote>
  
  <p>following DQL should be possible:</p>
  
  <pre><code>SELECT main.id = 1 AS test FROM Entity main ORDER BY test
  </code></pre>
  
  <p>However, when I try this (using 2.4), I get</p>
  
  <pre><code>Error: Expected Doctrine\ORM\Query\Lexer::T_FROM, got '='
  </code></pre>
  
  <p>It seems the developer-advised method of putting the condition into SELECT does not work. Is this a bug and / or is there another way of selecting and / or ordering by condition.</p>