After all, if you are putting down a carbine, rifle or shotgun and grabbing a pistol to defend yourself, things must have gone really bad.
From a practical standpoint, about the only two things that could justify switching from a long gun to a sidearm would be if a malfunction occurs or you're out of ammo. From a tactical perspective, there are others. You might need to use your weak hand to negotiate obstacles, call for help or move non-threats out of the way—all while keeping evil at bay—and a pistol is easier to operate with one hand than a long gun.
Since I no longer wear a badge or a camouflage uniform, I doubt I'll ever perform this transition outside of competition unless I'm trying to survive some apocalyptic situation, a natural disaster or a werewolf attack. However, it behooves any armed citizen to become proficient with this skill, just in case. The meltdown drill is the yardstick you can use to measure your ability.
Set a silhouette target at 10 yards, and start the drill with your long gun in the high-ready position. At the start signal, fire two rounds at the torso, transition to the handgun, then fire one round at the head. Practiced shooters can perform the meltdown drill in 5 seconds or less with no misses.
Ideally, your long gun should be equipped with a tactical sling, properly adjusted to be worn across the chest. This basically lets you drop it—with guidance from your weak hand—and draw your handgun.
If you have a light on your long gun and need to use it to see the threat, keep the long gun semi-mounted with its buttstock low on your chest. Operate the light with your weak hand while getting your pistol into the fight with your strong hand. It takes practice to perform smoothly, which is exactly why you should conduct this drill in low light as well as during the day.
The most logical reason to perform a transition would be if your long gun pukes. Otherwise, transitioning to a handgun is more of an administrative procedure. In the interest of safety and realism, conduct this drill with only two rounds loaded in your long gun. This ensures your carbine, rifle or shotgun is empty when you begin to make the transition. If you forget to put it on "safe," you won't have a loaded gun with a disengaged safety hanging from your neck by a string.