Hey ,
You can claim input tax credit on the railway ticket only if it is for your business purposes only.
As per section 16(1) ,
“Every registered person shall, subject to such conditions and restrictions as may be prescribed and in the manner specified in section 49, be entitled to take credit of input tax charged on any supply of goods or services or both to him which are used or intended to be used in the course or furtherance of his business and the said amount shall be credited to the electronic credit ledger of such person.”
So its very important to note that no input tax credit will be allowed for personal use.
Also it is important to note that your GST number should be on the ticket copy and they upload the same on GST portal