I think you can use [Cache Refresh Interception Script](https://gluu.org/docs/ce/3.0.1/admin-guide/custom-script/#cache-refresh) for this.
Here is how it will work:
- backend Org directory attribute 'gender' --> Gluu Server ldap attribute 'gender' [ this will map exact value ]
- Run interception script:
- Interception script will have conditions like:
- If value == '0' then insert 'male' as attribute in 'gender' and save the value in Gluu Server ldap
- else if value == '1' then insert 'female' as attribute in 'gender'
etc.