It's hard to tell from your question where you are hoping to get the AnswerID. If you want it in a single column, you will need to use @StayPuft's answer. If you want it as part of the text column, you can use the SQL below:
SELECT questionText, [1], [2], [3]
FROM
(
SELECT
ROW_NUMBER() OVER (PARTITION BY QuestionID ORDER BY newid()) AnswerInQuestionID,
CAST(AnswerID AS VARCHAR(20)) + ' - ' + answerTxt AS answerTxt,
QuestionText
FROM questions q
JOIN answers a
ON q.QuestionID=a.answer_question_id
) A
PIVOT
(
MAX(answerTxt)
FOR AnswerInQuestionID IN ([1], [2], [3] )
) as piv
If you want them as three separate columns, you can use the SQL below:
SELECT
questionText,
LEFT([1], 1) AS AnswerID1,
RIGHT([1], LEN([1]) - 1) AS AnswerText1,
LEFT([2], 1) AS AnswerID2,
RIGHT([1], LEN([1]) - 1) AS AnswerText1,
LEFT([3], 1) AS AnswerID3,
RIGHT([2], LEN([3]) - 1) AS AnswerText3
FROM
(
SELECT
ROW_NUMBER() OVER (PARTITION BY QuestionID ORDER BY newid()) AnswerInQuestionID,
CAST(AnswerID AS VARCHAR(20)) + answerTxt AS answerTxt,
QuestionText
FROM questions q
JOIN answers a
ON q.QuestionID=a.answer_question_id
) A
PIVOT
(
MAX(answerTxt)
FOR AnswerInQuestionID IN ([1], [2], [3] )
) as piv
EDIT: Added CHARINDEX() function and pipes ('|') to allow for varying number length. There are probably cleaner ways of doing this, but this worked for me:
SELECT
questionText,
LEFT([1], CHARINDEX('|', [1]) -1) AS AnswerID1,
RIGHT([1], LEN([1]) - CHARINDEX('|', [1])) AS AnswerText1,
LEFT([2], CHARINDEX('|', [2]) -1) AS AnswerID2,
RIGHT([2], LEN([2]) - CHARINDEX('|', [2])) AS AnswerText2,
LEFT([3], CHARINDEX('|', [3]) -1) AS AnswerID3,
RIGHT([3], LEN([3]) - CHARINDEX('|', [3])) AS AnswerText3
FROM
(
SELECT
ROW_NUMBER() OVER (PARTITION BY QuestionID ORDER BY newid()) AnswerInQuestionID,
CAST(AnswerID AS VARCHAR(20)) +'|'+ answerTxt AS answerTxt,
QuestionText
FROM questions q
JOIN answers a
ON q.QuestionID=a.answer_question_id
) A
PIVOT
(
MAX(answerTxt)
FOR AnswerInQuestionID IN ([1], [2], [3] )
) as piv