Isn't even simple flexibility and adaptability consciousness? There wouldn't be much intelligence there, but plants know where the Sun is, for instance.
No. Plants 'know' where the sun is because chemicals in certain cells in their stems are activated or deactivated by light; for example, this may cause the cells on the unlit side to swell slightly, producing a lean towards the light. There are various ways phototropism is achieved, but it's via relatively simple chemical 'reflexes'.
Limited flexibility, adaptability, and even basic learning can be achieved through relatively simple molecular switches, feedback loops, cascades, etc., and interacting sequences of habituation and dishabituation.
Evolution itself demonstrates how undirected processes can potentially show flexibility, adaptability, and even simple learning - responses often associated with intelligence over shorter timescales (albeit, in the case of evolution, via extremely wasteful trial-and-error).
It seems to me that consciousness evolved because flexibility, adaptability, and learning are such a huge selective advantage, particularly in social creatures. Modeling and mapping the self and the world enables virtualising possible futures, predicting the behaviour of others, and planning ahead; reasoning helps with problem-solving and planning intermediate goals, and using a controlled focus-of-attention to guide goal-seeking behaviour helps achieve the goals. The simplified conscious self provides a social representative or avatar for the whole, and a locus for important attributes such as agency, location, ownership, bounds, etc.