I want to select a stored proc to execute based on user input. Something like -
EXEC
CASE @InputParam
WHEN 'XML' THEN GetXMLData @ID, 'y'
WHEN 'TABLE' THEN GetTableData @ID, 'y'
END
Can this be done with CASE
or should I consider using the If
construct?