title: Create a Dynamic data SQL
body: <p>I have two tables in my sql server database</p>
  
  <p>1st table </p>
  
  <pre><code>SID--Role
  1--A
  2--B
  3--C
  4--D
  5--E
  </code></pre>
  
  <p>2nd table</p>
  
  <pre><code>RoleName--SID
  Admin--1
  Admin--4
  QA--2
  </code></pre>
  
  <p>Output For Rolename 'Admin' should be</p>
  
  <pre><code>SID--Role--Exists
  1--A--true
  2--B--false
  3--C--false
  4--D--true
  5--E--false
  </code></pre>
  
  <p>Can you guys please help me with a select query to get the above output</p>