The title of this post declares the intent of the code below
DECLARE @Domain VARCHAR(50);
DECLARE @Account VARCHAR(50);
SET @Domain = SUBSTRING(SYSTEM_USER, 0, CHARINDEX('\', SYSTEM_USER));
SET @Account = SUBSTRING(SYSTEM_USER, CHARINDEX('\', SYSTEM_USER) + 1, LEN(SYSTEM_USER) - CHARINDEX('\', SYSTEM_USER));
SELECT @Domain + '\' +@Account AS samAccountName;