Your query can be achieve using following steps
1.add link server thro sql server.
sp_addlinkedserver '<Server Alias>', '', 'SQLNCLI', NULL, NULL, 'SERVER=<IP>', NULL
sp_addlinkedsrvlogin '<Server Alias>', 'false', NULL, '<username>', '<password>'
just write the statement
select * from [LINKSERVERALIASNAME].[DATABASENAME].[ObjectName].[TABLENAME]