The animation would always be the same, so that's what you want. And I would use the same pipe graphic, and pick by Unique ID in the code to decide where to go.
Like LittleStain said, use a function to run the animation process, then separately call for the UID to tell which layout/area to go to. This way, you don't always have to go to another layout (like Mario 3's higher/lower areas for verticle levels).
Bottom line, it takes quite a bit anyways, but you can shorten the code by giving similar things such as the animation procedure as always the same regardless of which one it is, but each one does have to find a method of knowing where to bring the player.
Below is how I do it for warping in my Zelda 2 clone. Because there are no animations, but I use the same "event" graphic, I have to pick by UID to determine which graphic is actually being activated.