The US may use the controversial interrogation technique known as waterboarding in the future if a terrorist attack was thought to be imminent, the White House has said.