This spell is not obtained through a quest, and cannot be purchased with Training Points. This spell is only available as a possible reward from dueling the Loremaster or Koto, or as a very rare reward from the Ninja Lore Pack.
It can also be crafted by Legendary Artisan crafters, the recipe vendor is in Mooshu inside the main boss chamber in the Shirataki Temple dungeon. The boss Koto in the Cave of Solitude also drops it and it much quicker and easier to beat than Loremaster.
I dueled Koto about 45 times before the ninja pig spell dropped. Ninja Pig can be crafted, you get the recipe from a vendor that appears when you defeat Plague Oni. But it requires so many rare reagents I feel it is much quicker to just duel Koto. Note that like all the craftable spells, there is no school requirement, my Balance wizard learned Ninja Pig. But with power point limitations it isn't very useful to anyone but a myth wizard or someone with a myth mastery amulet.