Boxes 12a, 12b, 12c, and 12d on the W-2 are just four available spaces that can each contain a code and an amount. HSA contributions could be in any one of the four boxes, but it will have a code W before the amount. The W identifies it as HSA contributions.
HSA distributions are not shown on your W-2. HSA distributions are reported on a Form 1099-SA.