title: SQL Query with conditional order by for a specific condition
body: <p>Here is how my data looks like</p>
  
  <pre><code>CompanyName   |    CompanyCode
  -----------        -----------
                     B190  
  ARBOT              B213 
  INFRA              A946
  MichalesTest       B207
  MyCompany          Alerf
  MyCompany          lerf
  SNELSY             A857
  SNELSY             A954
  </code></pre>
  
  <p>I want to sort the list with <code>CompanyName = 'MyCompany'</code> to be the first in the list with its associated <code>CompanyCode</code> sorted in ASC.</p>
  
  <p>And all other items to be listed after <code>'MyCompany'</code> with its <code>CompanyName</code> sorted in ASC. Entries with null <code>CompanyName</code> can be at the end of the list.</p>
  
  <p>I’ve tried so far with the below query but I didn’t get the expected result. I was following the link <a href="http://msdn.microsoft.com/en-us/library/ms188385.aspx#Case" rel="nofollow">here</a></p>
  
  <pre><code>SELECT [CompanyName], [CompanyCode] FROM  [dbo].COND_ORDERBY_TEST
      ORDER BY CASE CompanyName WHEN 'MyCompany' THEN CompanyName
      ELSE CompanyName END, CompanyCode
  </code></pre>
  
  <p>I expect my final result set like the below</p>
  
  <pre><code>CompanyName   |    CompanyCode
  -----------        -----------
  MyCompany           Alerf     
  MyCompany           lerf      
  ARBOT               B213  
  INFRA               A946   
  MichalesTest        B207 
  SNELSY              A857
  SNELSY              A954 
                      B190
  </code></pre>
  
  <p>I’m sure there should be an elegant way to do this but I'm not getting it. Any help would be appreciated.</p>