I did it once, played a character that had 4 character classes because it fit with the situations and roleplaying aspects of the character. First off, he was a drow psychic warrior and at the beginning that's all I intended for him. Since he was good alignment, the first thing that had happened upon arriving to the surface was finding an ancient church, and got chosen by a god of mercy (go figure). So, he took two levels of cleric. Since he was also the god of Justice, and we were in the wilderness a lot, I took a level of Ranger and chose demons as my favored enemy (or whatever they are classified as) because we had a bad experience with one that was hassling my church. Finally, I took a level of Paladin and devoted myself fully to the church, justice and mercy, and trying to figure out completely what this whole mercy thing was. At the end of the campaign, when the DM moved away, I had a drow Psychic warior level 1, cleric level 2, ranger level 1, and Paladin level 2. He was awesome to play, everything fit in the spectrum of things. I even found a more experienced ranger to practice with and learn from, or else the DM wouldn't have let me take that level in ranger.
So, if the DM allows it, and it makes sense for the character and it can be roleplayed and developed, then anything is possible.