U kunt EXISTS
. gebruiken :
SELECT
CASE
WHEN EXISTS(
SELECT 1 FROM call_records
WHERE account = @accountnumber
)
THEN 'We Have Records of this Customer'
ELSE 'We Do Not Have Records For This Customer'
END AS 'result';