I have a few questions regarding the title of Prince of Wales.
1) If Prince Charles had predeceased his mother before he had any children, would Prince Andrew have been created Prince of Wales ?
As Prince Andrew would, in this scenario, have become the heir apparent and been the eldest living son of the monarch, he would immediately have become Duke of Cornwall, Duke of Rothesay etc. No doubt, after some suitable interval The Queen would then have created him Prince of Wales and Earl of Chester.
There are two precedence for this - Henry VIII and later Charles I. Both had older brothers who died leaving them to inherit and both were then created Prince of Wales as well as automatically, on the death of their older brothers becoming Dukes of Cornwall.
George V is another who was born the second son but ended up Prince of Wales and then King but, of course, his older brother didn't live long enough to be created Prince of Wales.
2) If Prince Charles had predeceased his mother after Prince William had been born, would Prince William have been created Prince of Wales?
The precedence we have for this scenario is George III who was created Prince of Wales by his grandfather less than a month after the death of Frederick, Prince of Wales. I suspect that Her Majesty would have waited a bit longer simply because she would be mourning her eldest son whereas George II didn't mourn his eldest son.
An even earlier precedent goes back into the very earliest of Princes of Wales. When Edward, the Black Prince, died his son, Richard II was very quickly created Prince of Wales.
3) if Prince Charles had become King and had not had any children, would Prince Andrew have been created Prince of Wales ?
No.
Andrew would only ever have been heir presumptive in this scenario so it wouldn't have be proper to create him Prince of Wales. He also wouldn't have been Duke of Cornwall as he wouldn't have been the eldest son of the monarch.
Charles II didn't create his brother, James II and VII, as Prince of Wales even though James was the heir presumptive throughout Charles' reign. George IV also didn't create either of his younger brothers, who were his heir presumptives during his reign (Frederick, Duke of York until 1828 and then William, Duke of Clarence - later William IV).