The MPSW51G is manufactured in a plastic TO-92 case. When looking at the flat side with the leads pointed downward, the three leads emerging from the transistor are, from left to right, the emitter, base, and collector leads. Here is an image showing the pin diagram of this transistor.
Complementary NPN transistor
The complementary NPN transistor to the MPSW51G is the MPSW01G.
SMD Version of MPSW51G transistor
The 2SA1036 (SOT-23), 2SA1036-P (SOT-23), 2SA1036-Q (SOT-23), 2SA1036-R (SOT-23), BCW67 (SOT-23), BCW67A (SOT-23), BCW67B (SOT-23) and BCW67C (SOT-23) is the SMD version of the MPSW51G transistor. These transistors are of the same type, have similar parameters and are designed for surface mounting.