You can use
sset parameter. From
set or sset <SCONTROL> <PARAMETER> ...
Sets the simple mixer control contents. The parameter can be the volume either as a percentage from 0% to 100%
with % suffix, a dB gain with dB suffix (like -12.5dB), or an exact hardware value. The dB gain can be used only
for the mixer elements with available dB information. When plus(+) or minus(-) letter is appended after volume
value, the volume is incremented or decremented from the current value, respectively.
The parameters cap, nocap, mute, unmute, toggle are used to change capture (recording) and muting for the group
The optional modifiers can be put as extra parameters to specify the stream direction or channels to apply. The
modifiers playback and capture specify the stream, and the modifiers front, rear, center, woofer are used to spec‐
ify channels to be changed.
A simple mixer control must be specified. Only one device can be controlled at a time.
In your case should be as simple as (NOT TESTED)
$ amixer sset 'Input Source',0,'Rear Mic'