I am trying to make one table value function in Sql Server. Here I have 3 columns and i want to merge them into one column lets say "new". This new column should show the name of 3 columns if they have value as 1.For example for row one it should display Isprod, for row 2 it should display IsCompetProd and so on.
IsProd IsCompetProd IsOther
1 0 0
0 1 0
0 0 1
1 0 0
Is there any way to do that?