AFAIK, for a part-time 4WD, it's best to put the transmission in P, then put the transfer case in N. this way, the transmission will not be prone to damage from non-circulating oil (because the tranny is disconnected from the drive wheels).

for a full-time 4WD or a two-wheel-drive vehicle... if you have no choice, put the tranny in N and tow (you shouldn't go too far though, for example, my owner's manual says that towing with the drive wheels down should not exceed a total of 80 km for the life of the vehicle). or better, put it in P and then remove the propeller shafts.