Actually, as khtan inferred, the whole thing is a bit insane. Let's fix it.
First, write the SELECT as a view. For discussion purposes, we'll name the view "TheView". Call the view whatever suites you. Creation of the view also allows you to test and tune the query before you go anywhere near BCP or dynamic SQL. Once you get to the dynamic SQL, it's going to save on a shedload of problems.
CREATE VIEW dbo.TheView AS
,TS_NAME = QUOTENAME(TS_NAME ,'"')
,TS_Description = QUOTENAME(TS_Description,'"')
,ST_Description = QUOTENAME(ST_Description,'"')
,Test_Data = QUOTENAME(Test_Data ,'"')
,ST_Expected = QUOTENAME(ST_Expected ,'"')
Order By Column1,Column2,Column3,Column4,Column5,Column6,Column7,Column8,Column9,Column10,TS_NAME,ST_STEP_ORDER
Once that's done and with the help of a bit of T-SQL prestidigitation, the rest becomes an easy to read and troubleshoot cake-walk.
DECLARE @SQL VARCHAR(8000);
SELECT @SQL = REPLACE(REPLACE(
'BCP "SELECT * FROM UofA.dbo.TheView" queryout <<@OutputLocation>> -c -t"|" -T -S <<@MachineName>>'
,'<<@MachineName>>' ,QUOTENAME(@MachineName ,'"')
EXEC xp_CmdShell @SQL
As a bit of a sidebar, I never use TOP 100%. There are too many problems that people have had with it over time.