Your provider should provide you with a preferred order or at least which codecs they are capable of using. Beyond that it's a matter of personal preference (others may argue this point, though).
Mine are set in this order:
G.729
G.711 U-law
G.711 A-Law
GSM
One of my providers does not support G.729 so I obviously don't use that codec with that provider.
Yes, you can mix and match and define different codecs your phone will use however I believe that you need to set 3CX up so that "PBX delivers audio." This way 3CX can transcode the data in the other codec (if necessary).