The world number one all but sealed his place in the last four of the competition on Wednesday as he came from a set down to win in three sets against his rival.
"We really pushed each other until the end. Until the last ball went out I wasn't sure if I was going to win the match," the Serbian told Sky Sports News.
"It could have gone either way. Andy is a great player and it was enjoyable to be part of this match."
Djokovic has now won both of his matches at this year's tournament.