Facing Issue to interface switch relay & potentiometer with PIC16F877a
You have the watchdog timer enabled and no watchdog clear in the code.

Without the prescaller the watchdog will reset the chip after 10 to 35ms so it won't go past ADC_Read function which contains a 50ms delay. 

Also Peter had a good point , use a smaller pot, the maximum ADC source impedance is 10kohm for PIC microcontrollers you're 50 times over it.