Let's look at this another way - what is it you're trying to do here? What's the requirement driving trying to populate a session variable like this?
If a user has a specific role I need to capture that in a session variable. The way that I have this setup is that a 0 will be returned if the role was not listed in the ROLES session variable or a value greater than 0 would be set if the role existed. The session variable is going to be read by the Oracle database to perform some specific functionality (at the database level) while the user is logged on and running queries. That specific functionality is to only occur when the user has that role.