How to configure a combination of buttons?

Hello! I set up a mini console with a Retroflag case and a Raspibarry, but I’m using a snes clone control and I wanted to configure the L2 and R2 button to work with the combination of Select + L or R, how can I do that?

RetroArch does not support any one-to-many or many-to-one macros, unfortunately.