You're thinking of World 8-4: "Rollercoaster Galaxy" in Super Mario Galaxy (2007), not New Super Mario Bros. Wii (which has no rollercoaster stage).
It's a fast-paced rail-riding level on a mine-cart star; steer with Wii Remote tilt.