I am working on SUB-GHZ frequency range for transmitting and receiving through a radio board.
from the table above if I select Flash Channel- 1 as input, it should map me to the Rail Channel 16.
If I select Flash Channel 20, it should automatically map me to Rail Channel 1.
Can anyone help me here on how to approach it, like some sample coding?
Language used is C.

As there seems no relation between the RAIL channel and the Flash channel, you will need a table that you can index by RAIL channel.
You have updated your question woth the requirement for the reverse lookup too. This could be done using a secondary table to map flash to raid, then (if needed) lookup the details such as frequency and word in the Raid table:
Note: As both RAIL and Flash channel numbers start at 1, but C indexes are from
0..n-1, a first entry in each table is added so the channel numbers can be used to index the arrays.EDIT
Given our discussion in the comments, the following is the simplified solution:
So each entry
xof theRAIL2Flash_tablehas aRAILchannel number corresponding to the indexx. SoRAILchannel 1 is in the array entry 1 and hasFlashchannel number 20, etceter. The same for the other table.