OPEN SYMMETRIC KEY CashSymmetricKey
DECRYPTION BY CERTIFICATE CashEncryptionCert;

SELECT 
    id,
    source,
    CAST(DECRYPTBYKEY(amount_encrypted) AS VARCHAR(50)) AS decrypted_amount,
    currency,
    last_updated
FROM cash;

CLOSE SYMMETRIC KEY CashSymmetricKey;
GO
