title: SQL Select subquery
body: <p>I'm a little new to SQL and have come across the following problem.</p>
  
  <p>I have a table with company details on it which is joined to a contact table by an enqID.</p>
  
  <p>Within the contact table, there are 4 different types of contacts which may or may not have an entry.  These are differentiated by a ctcTypID (1 - 4)</p>
  
  <p>I would like to produce a query that has all of the company records on it plus a contact name for each of the 4 different types of contact, all on one row.</p>
  
  <p>I thought I could do this by using subqueries for each of the different contacts but I can't seem to get it to work as I don't know how to write a subquery select clause that references it's parent select clause (if you see what I mean!)</p>
  
  <p>Is this even possible?  As I've mentioned, I'm pretty new to SQL so please try not to mock too much!</p>
  
  <p>Thanks,</p>
  
  <p>Steve</p>