Format SQL does not like this construction. Seems to be the .query and .value that causes the problem.
CASE WHEN caseTypeRecno IN ( 100010, 100016 )
THEN COALESCE(dbo.xmlCaseSplitTitle(caseDescLong).query('first'),'<first></first>').value('(first/node())[1]','nvarchar(max)')
ELSE caseDescShort
END AS caseTitleFirst,
CASE WHEN caseTypeRecno IN ( 100010, 100016 )
THEN COALESCE(dbo.xmlCaseSplitTitle(caseDescLong).query('first'),'<first></first>').value('(first/node())[1]','nvarchar(max)')
ELSE caseDescShort
END AS caseTitleFirst,