Suppose there is a table(TB_dynamic_date) with column_name as 'Data_to_select'
Lets say there is another table TB_Main_Data with column names as Name,DOJ,id
So , Is it possible to write a query in a way ,through which i can fetch dynamic no. of columns from TB_Main_Data,using the table TB_dynamic_date where TB_dynamic_data contains the following records under 'Data_to_select' as string
1)Name,DOJ
2)Name,id
3)Name,id,DOJ
4)Name,id,DOj,Name||id
What i need to do is something like the following:-
select **(1/2/3/4 record from TB_dynamic_data)** from TB_Main_Data
I Hope, i was able to explain clearly , what i want to ask.