Look for Box 12 and Box 13 on the W-2. The combination will indicate your retirement contributions - for example, 12D would be for elective deferrals to a 401(k).
The codes are all listed by the IRS with the W-2:
https://www.irs.gov/pub/irs-pdf/fw2.pdf