You would need to book from start-end. However you can disembark at Madgaon.
Kindly note Madgaon is a technical halt and the train may not necessarily stop there on your date of journey. Even if it does, the timings of its arrival/departure and its halt duration may not be fixed and may vary.
Thanks.