title: Order by Maximum condition match
body: <p>Please help me to create a select query which contains 10 'where' clause and the order should be like that:
  the results should be displayed in order of most keywords(where conditions) matched down to least matched.</p>
  
  <p>NOTE: all 10 condition are with "OR".</p>
  
  <p>Please help me to create this query.
  i am using ms-sql server 2005</p>
  
  <p>Like:</p>
  
  <pre><code>Select *
    from employee
   where empid in (1,2,4,332,434)
      or empname like 'raj%'
      or city = 'jodhpur'
      or salary &gt;5000
  </code></pre>
  
  <p>In above query all those record which matches maximum conditions should be on top and less matching condition record should be at bottom.</p>