i have a string with my needed columns, which i want to select. For example:
@sqlstring = 'col1,col2,col3'
I want select columns from table using this string. Like
SELECT @sqlstring FROM MyTable
But choose only this string, as much as columns count in table
col1,col2,col3
col1,col2,col3
col1,col2,col3