If I understand the question correctly, you have some sensitive data -- say, a list L of social security numbers in some order -- and you want to somehow create and publish a file D from that list such that
- If the person has a piece of data S, to query a database D to see if S is in L and if so, the row number where S occurs in L.
- You don't want some attacker who obtains D to be able to reproduce the entire dataset.
If each piece of independently-queryable data is small (say, a 9-digit social-security number), then this can't be done.
The attacker can simply query every possible social security number from 000-00-0000 to 999-99-9999, get back its position in the database, and then sort the (position, number) by position to recreate the original list of data.
As poncho mentioned, to turn this into a solvable problem you need to modify the criteria somehow.
If each piece of independently-queryable data is large enough -- say, each piece is a randomly-generated 128-bit encryption key -- then "going through every possible key" is not possible in this universe. (Seth Lloyd, "Computational Capacity of the Universe").
Then hashing each 128-bit random key (the SHA256 hash is a good choice) to create the database D looks like it would work for you.
Another approach is to somehow keep the list L and the database D behind a firewall, and only allow people who have already been authenticated and who you trust not to misuse the list L to query the list.
Another approach is to use a probabilistic test, perhaps a Bloom filter or something similar, that allows a person with some public file D to work out that his piece of data S is either "possibly in the list L" or "definitely not in the list L".
Perhaps in your specific application allowing most people to definitely confirm that their data S is definitely not in list L would be worth the risk of allowing an attacker to construct a list of "possible" social security numbers that includes 1/100 of all possible social security numbers, including all the numbers from your original list L, but with no way for the attacker to distinguish between numbers in the original list L and millions of other irrelevant numbers.