How to select a column with a string

Viewed 55

This is my code:

declare @MaxPointNumber INT=499, @pointNumber INT = 5;
select ('point'+CAST(@pointNumber as varchar))
from #TempHold

And this is the result: enter image description here

point5 should be the name of column, but somehow it becomes a new value in the table. Can anyone help me understand what is going on?

3 Answers
Related