Spoilers ahead for all who have yet to read the Harry Potter books or see the films.
As most of us know, sixth-year Hufflepuff student Cedric Diggory was tragically murdered by Peter "Wormtail" Pettigrew on Voldemort's orders at the end of Harry Potter and the Goblet of Fire. However, we often like to think "What if something happened differently?" In Cedric's case, we are likely to think about how the Harry Potter saga would have played out if he wasn't given the role of the sacrificial victim.
I always like to think that if Cedric listened to Harry and either returned to the Triwizard Cup or concealed himself, he could have survived the ordeal in the Little Hangleton graveyard and returned to Hogwarts with Harry alive rather than dead. Barty Crouch Jr. still would have been caught and though Cedric would gain some level of fame as someone claiming to have seen Voldemort in person and living to tell the tale as well as a Triwizard Champion, Harry would still be the more famous one overall.
For the duration of his last year at Hogwarts during the Order of the Phoenix, Cedric would have continued to stand by Harry throughout the Ministry of Magic's smear campaign against him and Dumbledore, whether or not anybody believed them about Voldemort's return despite Cedric being an eyewitness to the event with his own account of what happened to back Harry up. After all, he and Harry helped each other out during the Triwizard Tournament the previous year and at the end of it all, they'd basically owe each other their lives.
Then Cedric would have undoubtedly joined Dumbledore's Army with he and Cho Chang continuing their relationship from the previous year, and along with it, the love triangle between them and Harry. Somewhere down the line, Harry's unrequited feelings for Cho would come to a head. So he would let Cho know about his crush on her and tell Cedric about how the two of them being together during the Yule Ball was why he gave Cedric the cold shoulder before the Second Task of the tournament. I'd image Cedric being a fairly understanding person and telling Harry there would be no hard feelings between them, and Cho and Harry would continue being just friends even if the arrangement feels somewhat awkward. Then later he might have also gone on to join Harry, Ron, Hermione, Neville , Ginny, and Luna in going to the Department of Mysteries and participate in the following battle.
After that, Cedric would have graduated, explaining his absence during the events of the Half-Blood Prince, but rejoined Dumbledore's Army to fight in the Battle of Hogwarts. If Cedric had survived the final battle against Voldemort, I reckon he and Cho would have married and they'd remain on good terms with Harry.
On one side of the coin, the unexpected nature of Cedric Diggory's death served to propel the Harry Potter series into darker and more adult territory, to show Voldemort's disregard for human life, and give Harry the ability to see thestrals in the Order of the Phoenix. Yet if Cedric had survived the Triwizard Tournament, then he could have been further developed as a character. Even if it was still in a supporting capacity, he could have become something of a main character and become another valuable ally to Harry in the war against Voldemort and his forces.