I have prepared a demo where I paste my table structures and select query Here. Here one question can have multiple topics and for that reason multiple topics are displaying while join.
But I want something like this,
question_id | QuestionText | QuestionType | topicName
------------+-----------------------------------------+-----------------+-------------------------
1 | First true false question from fronend. | True/False | First Law,newton's law,...
I have tried my best as mentioned here to achieve:
How to concatenate text from multiple rows into a single text string in SQL server?
But could't be able to get my desired result.
I am using SQL Server 2014.