We just want to split the data based on some particular seperator (Here we have used comma(,) as a seperator)
Yes. We may have different logics..... But, which one is simplest way ?
Declare @Data Varchar(1000),
Select @Data = '1,200,310,41', @Seperator=','
Select @Data = 'Select ' + REPLACE(@Data,@Seperator, CHAR(10) + 'Union All' + Char(10)+ 'Select ')
Note: You can change this script for further requirement/logics...