title: SQL - joining on multiple columns in the same row
body: <p>Our school's ERP has a nasty database structure to it and since it is not normalized correctly, I have an issue with joining on the same table multiple times.</p>
  
  <p>The DegreeHistory table has these columns in one row entry for a person:</p>
  
  <pre><code>|Major1|Major2|Major3|Minor1|Minor2|Minor3|
  -------|------|------|------|------|------|
   CMPT                 BUSI
  </code></pre>
  
  <p>There is another table DegreeDescription:</p>
  
  <pre><code>|DegreeCode|DegreeDesc      |
  -----------|-----------------
  CMPT       |Computer Science
  BUSI       |Business
  </code></pre>
  
  <p>I want a query shows a student's degree history information but skips the degree codes and shows the degree description instead.  Is there a way I can do this other than:</p>
  
  <pre><code>SELECT dd.DegreeDesc, dd1.DegreeDesc FROM DegreeHistory dh
  LEFT JOIN DegreeDescription dd ON dd.DegreeCode = dh.Major1
  LEFT JOIN DegreeDescription dd1 ON dd1.DegreeCode = dh.Major2 ...
  </code></pre>
  
  <p>For each of the possible majors, minors, concentrations, certifications, etc...  Seems like a large and ugly query (though simple to do).</p>