Convert a base64 to varbinary

SELECT
   Id,
   FileInBase64, --the base64 value we want converted to varbinary
   CAST(FileInBase64 AS xml).value('xs:base64Binary(.)', 'varbinary(max)') AS FileInBinary
FROM Files