Just CPU isn't really enough. Going to mean a motherboard as well, so it is total cost of motherboard, CPU, and likely RAM.
If I just go by the price of an i5-6500 in Rupees, the i5-8400 isn't much more. But then you would need a Z370 motherboard.
The i5-7400 is certainly cheaper than the i5-6500, so certainly that is a better option. And lets you use something like a B250 motherboard to make it even cheaper.
R5-1500X is also in that price range. That gets you 6 cores like the 8400, but with SMT. Lower IPC though, so if gaming is the goal, then I would still lean towards the Intel chips.