When they see you they can just move towards you and shoot or something, and when they don't they can just move around randomly and scan for you.
Now for the fun part. How do you determine when they should change states?
Well one way would be to have them shoot and invisible detector towards to the player on an interval (every 10 seconds or so) and then when a detector hits a wall you destroy them, but when it hits the player have the enemy switch to the "See you" state.
When the detector touches the player you can either have all the enemies see you, or just the ones closest to you. You can use a foreach loop to accomplish this along with the distance formula.