If your page has only two course names you can use following two queries
SELECT question_Name FROM TableName WHERE course_Name="Asp.Net"
SELECT question_Name FROM TableName WHERE course_Name="Java"
otherwise you can use separate method to get following formatted output
string[] s= (FROM TableName SELECT DISTINCT course_name);
foreach(str in s){
getOutput(str);
}
string getOutput(string course){
string output=course+"\n";
string[] s=(FROM TableName
WHERE course_Name=course
SELECT question_Name);
foreach(str in s){
output+=str+"\n";
}
return output;
}
This is not exact code but hope you can get some idea from this...