In this paper, we propose a new CPG model for the snake-like robot being able to adapt to different environments. This model can produce typical serpentine, sidewinding and traveling wave locomotion gaits and switch between them automatically based on a simple input signal. The stability of this model is verified and the parameter restrictions are determined. Then, we investigate the relationship between the properties of CPG output and the parameters. Finally, the adaptive characters of this model is discussed. We found that there is an amazing similarity between the locomotion patterns produced by the CPG model and those of the real snake. The contribution of this work makes the snake-like robot be more adaptive to complex environments.