By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
WITH cte(CustomField1) AS (
VALUES('None'), (NULL), (10)
)
SELECT
CustomField1,
CASE
WHEN CustomField1 IS NULL THEN ''
WHEN CustomField1 = 'None' THEN ''
Else CAST(CustomField1 AS INT)
End ReceiptLoc
FROM cte
CustomField1 | ReceiptLoc |
---|---|
None | |
null | |
10 | 10 |