If you need the BIG-IP to do pool selection based on the URI of the HTTP request, then the BIG-IP will need to decrypt the SSL stream to access the URI, and the only way for that to happen is if you install the certificate and key on the BIG-IP. There's no way to access any part of the HTTP request otherwise. Once you do that, you can apply an HTTP profile and use this iRule just as on a non-SSL virtual server. If you need the data to be encrypted between the BIG-IP and the server, then you can also apply a serverssl profile to accomplish this.
Hope this helps!