Correct Answer - Option 2 : AAILRSWY
The logic followed here is :
Here letters of the given word are arranged in alphabetical order.
So, the code for COMPUTER after arranging letters in alphabetical order = CEMOPRTU.
Similarly,
The code for RAILWAYS after arranging letters in alphabetical order = AAILRSWY.
Hence, AAILRSWY is the correct answer.
NOTE :
It is not necessary that in coding-decoding you always get the pattern of letter shifting or criss-cross letter shifting. we need to check the options also when no pattern strikes our brain. From the options, we can get the idea that letters are alphabetically arranged here.