You could consider running through a VPN, such as Tunnelbear, to confirm if erratic pings continue. If they do, it's likely an issue with your computer, or the game. If the issue stops, then it may be a case of your ISP sponsoring specific routes, or prioritizing other traffic over your game's.
It can sometimes be an issue with the game, as the ping is calculated by the time between data sent by the game, and the return of data acknowledged by the server. Your game could also be placing too much stress on your system, not allowing it to dedicate enough resources to running the networking optimally.
There's tons of factors that lead to erratic ping. Troubleshooting these factors is a huge pain in the ass. Good luck.