* Magistrates want to know where Swiss cash withdrawals went
* Focus on relations with billionaire L'Oreal heiress
PARIS Nov 20 (Reuters) - Former French President Nicolas Sarkozy is due to be questioned on Thursday by magistrates trying to establish whether his 2007 election campaign was illegally financed by the country's richest woman, a judicial source said.
The risk for Sarkozy, unseated in May but considered a potential conservative candidate in the 2017 presidential race, is that he ends up plagued by suspicion for months or years, even if his lawyer says there is no case against him.
In one strand of a broader inquiry, magistrates are looking at 4 million euros ($5.1 million) of cash withdrawals - notably two 400,000-euro withdrawals in 2007 - from Swiss bank accounts of Liliane Bettencourt, heiress of the L'Oreal cosmetics empire.
Police raided Sarkozy's Paris residence and offices as part of the investigation in July, weeks after the 57-year-old Sarkozy lost the legal immunity he enjoyed as head of state.
Since that immunity expired, lawyers are also demanding that Sarkozy explain himself in two other legal cases, one concerning the terms of a submarine sale contract with Pakistan and another concerning lavish spending on opinion polls by his office when he was president.
In the Bettencourt affair, initial suspicions were fuelled three years ago when a woman who worked as an accountant for the mentally frail Bettencourt, now aged 90, alleged that a large cash withdrawal was earmarked for Sarkozy's campaign.
His lawyers, who declined comment on Tuesday, have previously dismissed the allegations and said the police swoops would if anything debunk talk of secret meetings between Sarkozy and Bettencourt in 2007.
If the magistrates decide to place Sarkozy under full-blown judicial investigation, he will be exposed to a process which, even if it does not ultimately lead to a trial, traditionally takes many months or even years to complete.
Since his election defeat to left-winger Francois Hollande, Sarkozy has withdrawn from politics and, like Bill Clinton, Tony Blair and other former leaders, become a star conference speaker, recently headlining a Brazilian bank event in New York.
Sarkozy was due to address an event in London this week, his aides say.
His departure sparked a bitter leadership battle that has split his centre-right UMP party as it seeks to overcome the disarray of presidential and parliamentary election defeats, enhancing Sarkozy's chances of staging a comeback as a rift-healing future leader. ($1 = 0.7803 euros) (Reporting by Thierry Leveque; Writing by Brian Love; Editing by Jon Hemming)