title: SQL Server - Update several columns in table when the join's where clause has conditions that are mutually exclusive
body: <p>This is my code so far:</p>
  
  <pre><code>update 
      A
  set 
      A.NAME= B.NAME,
      A.MOBILE = C.MOBILE
      A.TOLLFREE = C.NUMBERVALUE 
  from ACCOUNT A
      inner join COMPANY B on a.COMPANYID = B.COMPANYID
      inner join PHONE C on B.COMPANYID = C.COMPANYID
  where c.TYPEID = '1111'  
  </code></pre>
  
  <p>The idea is that C.TYPEID has several codes.</p>
  
  <ul>
  <li>1111 is the tollfree phone</li>
  <li>2222 is the mobile phone</li>
  </ul>
  
  <p>I'd like to write a single statement updating all the different phone column types where the <code>C.TypeID</code> is 1111 for the toll free phones and <code>C.TYPEID</code> is 2222 for the mobile phones.</p>
  
  <p>How would I do that?</p>