Volume of a pyramid: 1/3(length x width x height)
Since it is a square pyramid, the base is a square, which means that the length and width of the base is 7 cm (the same).
Plug the numbers into the formula.
1/3(7 x 7 x 12) = 196
The volume is 196 cm³.