It sounds like you want to keep the different outputs according to the database variables completely seperate. If this is the case, you'd have to generate the different outputs from RoboHelp using conditional build tags and then programmatically install the relevant output according to the database varibable. There is no way to achieve this directly inside RoboHelp.
Thanks RoboColum(n). I think this might work for me. I found an article describing something like what you said. I will look into this: