Quote:
This topic name has 10 questions for this 10 questions i am getting Auxiliary Verbs 10 times that i don't require.
The problem with your query is that you have included the
QuestionNumber
column. It is unlikely that you actually want the question number so just leave it out
SELECT DISTINCT SubjectCategory FROM QuestionPaper
Alternatively you can use GROUP BY and return something meaningful such as the number of questions in each category e.g.
SELECT SubjectCategory, COUNT(QuestionNumber) as NoOfQuestions FROM QuestionPaper GROUP BY SubjectCategory