Contract storage is the most expensive at generally 20,000 gasgenerally 20,000 gas for each 32 bytes (which is 1 storage slot).
Logs cost 375 gas for a LOG operation. 375 gas for each topic. 8 gas for each byte of a LOG operation's data. See Ethereum event log maximum sizeEthereum event log maximum size for more information.
Transaction input costs 4 gas for a zero byte, and 68 gas for a non-zero byte.
Important consideration: Does the data need to be accessible directly by contracts? If so, contract storage is the only option: contracts can't directly access logscan't directly access logs or other transactions.