><> (Fish), 27 bytes
v>&"@"+o
<^v?)"@"&:
-n>&"@"
Assumes input is on the stack. Exits with error, which is allowed by default
Explanation
A bit messy to explain because the IP goes in several paths.
v
< &: | store the value in the & register
)"@" | is it alphabetic? (if it is greater than 64 (charcode of @)
v
-n>&"@" | subtract the & register and 64 and output as a number
| otherwise the rest of the first line is executed
>&"@"+o | adding & register and @ (64) and outputting the char of that charcode