if you get any custom spawner like
/give @s minecraft:spawner{BlockEntityTag:{SpawnData:{id:"minecraft:chicken"},SpawnPotentials:[{Entity:{id:"minecraft:chicken"}}]}}
if placed in survival it will be a pig spawner, if in creative, it will be a chicken spawner
See MC-105216.