How do I forward a call to a dialed extension?

How do I create a feature code to forward a call to any extension that is dialed on the phone?
For example I get a call and I want to forward this call to another extension and thus I dial the feature code and then the extension I want to forward the call to.
I can’t use static extension destinations for that since it should be possible to forward a call to any extension.

Pedantic Mode ON:

FORWARD is used to send all calls for an extension to another extension. If the phone is busy or no one answers, the call will be forwarded to an extension.

TRANSFER is used to send a call in progress to an extension. You don’t normally transfer all of your calls to the same person, so having a transfer button for just one person would be a huge pain in the butt (for them).

You seem to be using the term FORWARD to mean TRANSFER, but I could be mistaken.

Attended call transfer is *2 followed by the number you want to send the call to. Blind call transfer is ‘##’’ followed by the destination.

You can look up the feature codes implemented in your system by clicking on the “Feature Codes” menu item and look through that list.