title: MS Sql: Conditional ORDER BY ASC/DESC Question
body: <p>I want to to make to make the ordering in my query conditional so if it satisfiess the condition it should be ordered by descending </p>
  
  <p>For instance:</p>
  
  <pre><code>SELECT * FROM Data ORDER BY SortOrder CASE WHEN @Direction = 1 THEN DESC END
  </code></pre>