Is there a way to have a single openwrt package Makefile support multiple "versions"?

For example, we have the following package "test1" Makefile:

...
PKG_NAME:=test1
PKG_VERSION:=1.2
PKG_RELEASE:=1
PKG_REV:=4f0c448faacfbcae185631ece73f196dc66851ca

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
PKG_SOURCE_URL:=ssh://git@<>:123456/<remote>/test1.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
...

And we have a "test2" package which depends on this package:

...
define Package/$(PKG_NAME)
        SECTION:=net
        CATEGORY:=test
        TITLE:=test2 package depending on test1
        DEPENDS:=test1
endef
...

I want to have test1 package support multiple versions, whereas each version sets the PKG_REV hash differently, and a specific version to be "default".
I want test2 to *select* a specific version of test1 *if* test2 is selected in menuconfig.

What is the correct way to do that??