A robot functioning in an environment may exhibit various forms of behavior emerge from the interaction with its environment through sense, control and plan activities. Hence, this paper introduces a behaviour selection based navigation and obstacle avoidance algorithm with effective method for adapting robotic behavior according to the environment conditions and the navigated terrain. The developed algorithm enable the robot to select the suitable behavior in real-time to avoid obstacles based on sensory information through visual and ultrasonic sensors utilizing the robot's ability to step over obstacles, and move between surfaces of different heights. In addition, it allows the robot to react in appropriate manner to the changing conditions either by finetuning of behaviors or by selecting different set of behaviors to increase the efficiency of the robot over time. The presented approach has been demonstrated on quadruped robot in several different experimental environments and the paper provides an analysis of its performance.