You've got 3 main options:
Option #1: (Most robust, but most CPU Intensive)
In real-time calculate corner areas wide enough for the NPC to hide and that aren't exposed to the player. Choose the nearest for the player to hide.
This will work on any level which is nice and on levels with geometry that changes during gameplay. But it will take the longest to get working consistently and will use up to most CPU resources during the game.
Option #2: (Save level designer time, minimal real-time hit)
Create an offline tool that does the corner test and then places nodes in your level for all potential cover areas. LD's can then tweak these nodes or remove ones that aren't appropriate.
During gameplay just find the nearest valid node.
This is nice in that your corner finding routing doesn't have to be 100% accurate since LD's can screen out a few bad nodes here and there. Can't respond to changes in geometry though unless you start getting clever with attaching them to objects, or scripting them on/off.
Option #3: (Brute Force, minimal real-time hit)
Have LD's manually place all cover nodes, and then just choose the nearest valid node during gameplay.
If you have lots of levels or big levels expect the LDs to complain.