I wouldn't do this in SQL - it's string handling is basic at best. And it doesn't handle multiple "index of" type operations well.
But:
SELECT SUBSTRING(ErrorCode,
CHARINDEX ('@', ErrorCode, 1)+1,
(CHARINDEX ('(', ErrorCode, 1) + CHARINDEX ('[', ErrorCode, 1)) - CHARINDEX ('@', ErrorCode, 1) - 1)
FROM TestTable
Should do it.