SELECT *   
FROM Md.SourceApplications  
WHERE  
	(CASE WHEN ISNULL(@SearchText, '') <> '' THEN          CASE                 WHEN Description LIKE '%' + @SearchText + '%' THEN 1                 ELSE 0         END         ELSE 1  END) = 1 
	AND   (CASE WHEN ISNULL(@SourceApplicationID, '') <> '' THEN   CASE WHEN SourceApplicationID = @SourceApplicationID THEN 1 ELSE 0 END   ELSE 1   END) = 1  ORDER BY Description ASC