title: T-SQL (Order by Case) to LinQ
body: <p>I have the folowwing statement and I would like to have a LINQ equivalent:</p>
  
  <pre><code>SELECT *
  
    FROM People
  
    where Name like '%something%'
  
    ORDER BY CASE 
  
    WHEN Name LIKE 'something%' then 1
  
    WHEN Name LIKE '%something%' then 2
  
    ELSE 3 END
  </code></pre>
  
  <p>Basically, I'm retrieving all the rows which contains a value (in this case 'something') and I'm ordering them: first the ones starting with that value, and then the remaining.</p>
  
  <p>Any idea on how to do that in LinQ?</p>