What have you tried?
Concatenate the columns like below
SELECT ID, Column1 + "," + Column2 + "," + Column3 ....
In above query you have to check if the column value is NULL(in your case -) & omit that if returns NULL(-). For that you could use
CASE[
^] statement.
For second query you need to find the occurence of character(,), check this one
Character Occurrences[
^]
Now your turn, go ahead. Customize where you want.