The stone plates on the wall tell you that blue is bad and five is bad. Red is the only color with five switches. Thus you have to activate all yellow and green switches (and only those) and then talk with the statue.