I have a stored procedure being called from a C# application. This stored procedure has two mutually exclusive code paths; They both return similar type of records, like this:
IF x=y
SELECT colX, colY
FROM TableA
ELSE
SELECT colX,colY
FROM TableA
WHERE colX > 100
The task on hand involves writing the result of the sp call in a text file; the file's name depends on which of the two SELECT was executed. The name will be MyTextFile.txt or MyTextFileGT100.txt
How do I tell the C# app which of the two SELECT statements was executed?