I hate to say it but its both the switch (which is a piece of crap to begin with) and the HVAC system itself. The switch is one of those dial type's. Eventually after time goes on, the switch's contact's wear down and the rotary contact's start 'skipping'. Ergo, the HVAC goes wacko ! The only real solution is to replace the whole switch (and buy a couple of extra's. You'll need them if you're going to keep the Jeep for any length of time) which is fairly straightforward. Disconnect the battery, strip the center console of the rotary knob's and ashtray and unscrew the whole dammed thing. it looks overwhelming but take it 1 step at a time, and even get some help if you can, and it will come out. The switch itself is a 2 screw 'hold-down' and comes out pretty easy. Just be sure you unplug the electrical contact's first ! A fast spray of contact cleaner wouldn't be a bad idea either given what Jeep cab's tend to collect ! The install is in reverse order. Once you're all buttoned up, put the TEMP to whatever and run the fan speed switch thru all 4 setting to be sure the switch is installed right.
The other problem is, unfortunately a lot harder to solve. There is a HVAC selector rod that control's the defroster duct's that is a real 4 star PITA ! It requires you to almost totally strip the dashboard, including the gauge cluster, out to get to it. Jeep Magazine covered this and they were quoted (bear in mind they're in California) a completed shop price of over $1000,-- to do this one.
Once you get to it, it's a simple matter to slide the end of the HVAC control rod back into the defroster control lever. The problem is that the arm just sits in the arm's drilled out hole WITH NO MEANS OF KEEPING IT PINNED IN !. This was covered about a year ago, best I can recall, in JEEP Magazine. Everytime they had their test Jeep go out and trail ride, even on simple sand dunes, the rod would 'pop' out. JEEP Mag's solution was to take the rod out, put it in a drill press vice and drill a small hole in the end of the rod, beyond where it sit's in the hole and insert a cotter pin to keep it from coming out no matter how bumpy the ride. Not a bad idea when you think about it.