I want to parse a string variable passed into a stored procedure, but am unsure how to do it. Ultimately, I'm going to build a SQL statement with the parsed string.

Example:
@var = 'firstname,lastname,address,city,state,zipcode'

Result:
'SELECT [firstname], [lastname], [address], [city], [state], [zipcode]
FROM Table'

How would I do this with a character delimited string?
Thanks.