Zechariah 12:10
10 And I will pour upon the house of David, and upon the inhabitants of Jerusalem, the spirit of grace and of supplications: and they shall look upon me whom they have pierced, and they shall mourn for him, as one mourneth for his only son, and shall be in bitterness for him, as one that is in bitterness for his firstborn.
God says that they will look upon "me who they pierced", which refers to Jesus being pierced (John 19:37).
This verse has a contested translation. Some versions render Zechariah 12:10 as saying something like, "the one who they pierced" (CEV, NRSVUE), or "Him who they pierced" (TLB, NABRE, NLV, RSV), which matches the quotation given in John 19, which does not say "me who they pierced", but "Him who they pierced" (John 19:37). Additionally, the REV translates the passage, "they will look to me because of him whom they have pierced, and they will mourn for him".
This passage is also alluded to in Revelation 1:7, and in context, people are looking upon Jesus, and not Yahweh, which would give support to the "look upon Him" reading. Therefore, both New Testament references (John 19:37, Revelation 1:7) would favor a reading like "look upon Him who they pierced".
However, in either case, God can certainly be said to have been "pierced" when Jesus was crucified, in a similar way that Mary can be said to have been vicariously "pierced" in Luke 2:35, which many commentators would say refers to the crucifixion of her son, which she witnessed (John 19:25-27). So, if the reading represented by the KJV and other Bibles is correct, God is spoken of as being pierced in a figurative or representational sense, as Jesus, who is His representative, is being pierced.