I have a table that has three columns
I want my result set to be like
You need to split the strings. Split strings the right way – or the next best way
If you are on Sql Server 2016 you can use the built in String_Split()
: Splitting Strings: SQL Server 2016 To The Rescue!