The U.S.S. Barb is the only submarine credited with having destroyed this kind of enemy target.
An airplane
An aircraft carrier
A train
A royal palace
A train. The Barb, commanded by Gene “Lucky” Fluckey, landed an 8-man party that mined a train track close to the shore and blew up a Japanese transport train on July 23, 1945.