First run a query to find the logical name of the datafiles
Restore filelistonly from disk = 'd:\backup\Data.bak'
Where "d:\backup\Data.bak" should be your backupo name
Which should show the Logical filenames in the backup set.
Now
Restore database Newdatabase from disk = 'd:\backup\Data.bak'
with move 'LogicalnameforMDF' to 'd:\SQLData\NewDatabase.MDF',
move 'LogicalnameforLDF' to 'd:\SQLData\NewDatabase_Log.lDF', stats
Where
1. "d:\backup\Data.bak" is your Backup name
2. "LogicalnameforMDF" is the Logicalname as shown in the previous query for the MDF File
3. "d:\SQLData\NewDatabase.MDF" physical filename on the disk(where the data to be restored)
4. "LogicalnameforLDF" is the Logicalname as shown in the previous query for the LDF File (Log)
5. "d:\SQLData\NewDatabase_Log.lDF" is the physical File name of the Log