As @psb6m suggested, ligatures are typically multiple glyphs that get substituted by a single glyph. This is a many-to-one substitution.
OpenType does not offer a many-to-many substitution as you want, but it can be simulated by placing a lookup in the Prefix section and referencing that from the ligature feature:
Here, you match the pattern A G
in the liga
feature. The '
single quote marks the G
as the glyph that should get replaced and the lookup some_ lookup
after the pattern references a lookup that you have defined in the prefix which substitutes the G
by all of the desired glyphs, including the G
itself.