I like and wear them both, but for survival, you want a wide brim hat. Simply put, it will keep you cooler, and hopefully keep your exposed areas like the back of your neck from getting sunburned. Also, when it rains, it will repel the water away from your clothing.
If you are wearing your backpack with your wide brim hat in the rain, put on a backpack rain cover, so the water rolls off the pack and keeps it dry. You can get away with a baseball cap if you are willing to wear a shemagh or keffiyeh to protect your neck from the sun.