title: Split function in SQL Server 2008
body: <p>I have <code>Table1</code> with columns like this:</p>
  
  <pre><code>+--+------+
  |ID|Name  |
  +--+------+
  |1 |MSSQL |
  +--+------+
  |2 |MySQl |
  +--+------+
  |3 |Oracle|
  +--+------+
  </code></pre>
  
  <p>In <code>Table2</code>, I have a column like</p>
  
  <pre><code>+------------+
  |Databasename|
  +------------+
  |1,3         |
  +------------+
  |2           |
  +------------+
  |1,2         |
  +------------+
  </code></pre>
  
  <p>My output should be:</p>
  
  <pre><code>+------------+
  |Databasename|
  +------------+
  |MSSQL,Oracle|
  +------------+
  |MySQL       |
  +------------+
  |MSSQL,MYSQL |
  +------------+
  </code></pre>
  
  <p>How do I get this, I need query for this..</p>