title: Insert into a table based on flag values of other table
body: <p>I have two tables </p>
  
  <pre><code>src (party_key,is_NRA,is_DOM,is_PEP)
  </code></pre>
  
  <p>and </p>
  
  <pre><code>dest(party_key,aml_type,aml_name)
  </code></pre>
  
  <p>What I want to do is -</p>
  
  <pre><code>If src.is_NRA = 1, then insert into dest values (src.party_key,'NRA','Is NRA')
  If src.is_DOM = 1, then insert into dest values (src.party_key,'DOM','Is DOM')
  .
  .
  </code></pre>
  
  <p>One row in src table can have all 3 flags as '1'. In that case, I want to insert 3 separate rows in dest table.</p>
  
  <p>How can I implement this in SQL?</p>